package com.firmboy.springboot_axis2.config;

import org.apache.axis2.transport.http.AxisServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.ResourceUtils;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.io.File;
import java.io.FileNotFoundException;

/**
 * @author firmboy
 * @create 2018-06-06 下午7:25
 **/
@Configuration
public class Axis2Config {

    @Bean
    public ServletRegistrationBean axisServlet(){
        ServletRegistrationBean servlet = new ServletRegistrationBean();
        servlet.setServlet(new AxisServletExport());
        servlet.addUrlMappings("/services/*");
        servlet.setName("AxisServlet");
        servlet.setLoadOnStartup(1);
        return servlet;
    }


}
